<?php
/**
 * HTTP服务 - Post请求类型过滤
*/

namespace houze\route\doc\lable;
use \houze\route\doc\lable\Basics;

class HttpPost extends Basics {
    /**
     * 启动项
    */
    public function run($route){
        if (isset($route['own']['Post'])) {
            if ($this->request->method() != 'POST') {
                $msg = array_shift($route['own']['Post']);
                if (!$msg) $msg = 'Route Method Post';
                
                return $this->route_error($msg);
            }
        }

        // 更新容器
        return $this->_return();
    }
}